-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NOISUE - Fix cache error when key is not in Redis #1220
Conversation
6d13a34
to
f101bf3
Compare
things/redis/things.go
Outdated
var ErrRedisThingSave = errors.New("saving thing in redis cache error") | ||
var ( | ||
// ErrRedisThingSave indicates error while saving Thing in redis cache | ||
ErrRedisThingSave = errors.New("saving thing in redis cache error") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
failed to save thing in redis cache
things/redis/things.go
Outdated
// ErrRedisThingID indicates error while geting Thing ID from redis cache | ||
var ErrRedisThingID = errors.New("get thing id from redis cache error") | ||
// ErrRedisThingID indicates error while geting Thing ID from redis cache | ||
ErrRedisThingID = errors.New("get thing id from redis cache error") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
failed to get thing id from redis cache
things/redis/things.go
Outdated
// ErrRedisThingRemove indicates error while removing Thing from redis cache | ||
var ErrRedisThingRemove = errors.New("remove thing from redis cache error") | ||
// ErrRedisThingRemove indicates error while removing Thing from redis cache | ||
ErrRedisThingRemove = errors.New("remove thing from redis cache error") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
failed to remove thing from redis cache
Codecov Report
@@ Coverage Diff @@
## master #1220 +/- ##
==========================================
- Coverage 77.44% 76.87% -0.57%
==========================================
Files 104 106 +2
Lines 6875 6961 +86
==========================================
+ Hits 5324 5351 +27
- Misses 1164 1212 +48
- Partials 387 398 +11
Continue to review full report at Codecov.
|
3089280
to
1dd8880
Compare
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Fix cache error when key is not in Redis Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Fix tests Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Fix errors message Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: dusanb94 dusan.borovcanin@mainflux.com
What does this do?
This pull request fixes an error Things service throws in case that key is not present in Redis. In that case, Redis returns an error, which is actually nil but is not nil type.
Which issue(s) does this PR fix/relate to?
There is no such issue.
List any changes that modify/break current functionality
There are no changes that modify current functionality.
Have you included tests for your changes?
No.
Did you document any new/modified functionality?
No.